﻿/**
  KCAKCAK   CAKCAKC   AK      CA
 AK        KC     CA  AK    AK
CA         KC     CA  AK  KC
CA         KCAKCAKCA  AKCA
CA         KC     CA  AK  KC
 AK        KC     CA  AK    AK
  KCAKCAK  KC     CA  AK      CA

_________________________________________________________________
 China ataca Kamchatka - copyright 2007(c) Ruben Sainz de la Maza
 
	@class: 	CAKdata
	@vertion: 	0.1
	@date:		22/11/07
				
	@language: 	ActionScript 3.0
	@author:	Ruben Sainz de la Maza
	@usage: 
		_objCAKdata = CAKdata.getInstance();
		_objCountries = _objCAKdata.countries;
			
**/

package com.conelmate.cak.board.data
{
	
	public class CAKdata
	{
		internal static	var	INSTANCE			:CAKdata;			//instancia de esta clase (singleton)		
		private			var	_objPlayers			:Object;			//datos de jugadores
		private 		var _objContinents		:Object;			//datos de continentes
		private 		var _objCountries		:Object;			//datos de paises
		private 		var _objCountriesID		:Object;			//datos de paises por ID
		private 		var _objIconCards		:Object;			//tipos de iconos de las tarjetas
		private 		var _objObjectiveCards	:Object;			//cartas de objetivos
		private 		var _objSituationCards	:Object;			//cartas de situacion				

		
//_________________________________________________________________________________ Constructor
		public function CAKdata(enforcer:SingletonEnforcer)
		{
			//Iniciar los objetos para estar disponibles a pedido de otras clases
			setPlayers();			//crear y llenar el objeto _objPlayers con los datos basicos de jugadores
			setContinents();		//crear y llenar el objeto _objContinents con los continentes
			setIconCards();			//crear y llenar el objeto _objIconCards con los iconos de las cartas
			setCountries();			//crear y llenar el objeto _objCountries con los paises
			setObjectiveCards();	//crear y llenar el objeto _objObjectiveCards con los objetivos del juego
			setSituationCards();	//crear y llenar el objeto _objSituationCards con los datos de situaciones
		}		
		

//_________________________________________________________________________________ Public Methods

		/**
		 * Singleton.  Devuelve una instancia unica de esta clase
		 */
		public static function getInstance():CAKdata
		{
			if(CAKdata.INSTANCE == null) CAKdata.INSTANCE = new CAKdata(new SingletonEnforcer());
			return CAKdata.INSTANCE;
		}		


		/**
		 * setear dentro del objeto _objContinents el color del jugador al cual pertenece
		 * @param   pColor 	:color del jugador
		 * @param   pIds	:array de ids de paises
		 */		
		public function setPlayer(pColor:String, pIds:Array, objPlayer):void
		{
			if(objPlayer != null) _objPlayers[pColor].name = objPlayer.pName;

			for(var n:uint = 0; n < pIds.length; n++){
				for(var i in _objCountries){
					if(Number(_objCountries[i].id) == pIds[n]){
						_objCountries[i].player = pColor;
						if(objPlayer != null) _objCountries[i].color = _objPlayers[pColor].color;
						break;
					}
				}
			}
		}
		
		
		/**
		 * devuelve el pais a partir de un id
		 * @param   id :numero id del pais
		 */		
		public function getCountryIndex(id:Number):Object
		{
			return _objCountries[_objCountriesID[id]];
		}
		
		
//_________________________________________________________________________________ Private Methods

		/**
		 * crear y llenar el objeto _objPlayers
		 */		
		private function setPlayers():void
		{
			_objPlayers = new Object();
			_objPlayers["NEGRO"]	= {id:0, name:"", color:"0x222222" };
			_objPlayers["ROJO"]		= {id:0, name:"", color:"0xFF0000" };
			_objPlayers["AMARILLO"]	= {id:0, name:"", color:"0xFFFF00" };
			_objPlayers["AZUL"]		= {id:0, name:"", color:"0x0066CC" };
			_objPlayers["BLANCO"]	= {id:0, name:"", color:"0xFFFFFF" };
			_objPlayers["VERDE"]	= {id:0, name:"", color:"0x00CC33" };
		}
		
		
		/**
		 * crear y llenar el objeto _objContinents
		 */		
		private function setContinents():void
		{
			_objContinents = new Object();
			_objContinents["AMERICA DEL NORTE"]	= {id:1, name:"América del Norte",	qty:12 };
			_objContinents["AMERICA CENTRAL"]	= {id:2, name:"América Central",	qty:6  };
			_objContinents["AMERICA DEL SUR"]	= {id:3, name:"América del Sur",	qty:8  };
			_objContinents["EUROPA"]			= {id:4, name:"Europa",				qty:16 };
			_objContinents["AFRICA"]			= {id:5, name:"Africa",				qty:8  };
			_objContinents["ASIA"]				= {id:6, name:"Asia",				qty:16 };
			_objContinents["OCEANIA"]			= {id:7, name:"Oceania",			qty:6  };			
		}
		
		
		/**
		 * crear y llenar el objeto _objIconCards
		 */		
		private function setIconCards():void
		{
			_objIconCards = new Object();
			_objIconCards["CASCO"]					= {id:1, name:"Casco"};
			_objIconCards["TANQUE"]					= {id:2, name:"Tanque"};
			_objIconCards["METRALLA"]				= {id:3, name:"Metralla"};
			_objIconCards["CASCO TANQUE"]			= {id:4, name:"Casco Tanque"};
			_objIconCards["CASCO METRALLA"]			= {id:5, name:"Casco Metralla"};
			_objIconCards["TANQUE METRALLA"]		= {id:6, name:"Cañon Metralla"};
			_objIconCards["CASCO TANQUE METRALLA"]	= {id:7, name:"Casco Tanque Metralla"};			
		}
		
		
		/**
		 * crear y llenar el objeto _objCountries
		 */		
		private function setCountries():void
		{
			if(!_objContinents) setContinents();
			if(!_objIconCards)	setIconCards();
			
			//FALTA REEMPLAZAR icon:_objIconCards["CASCO"] POR OTROS MOTIVOS (ver el listado abajo)
			_objCountries = new Object();			
			
			//AMERICA DEL NORTE
			_objCountries["ISLAVICTORIA"]	= {id:1,	index:"ISLAVICTORIA", 	movie:new ISLAVICTORIA(), 	name:"Isla Victoria",	x:42,	y:-20, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[2,7],						soldiers:0, player:"", color:""	};
			_objCountries["ALASKA"]			= {id:2,	index:"ALASKA", 		movie:new ALASKA(), 		name:"Alaska", 			x:-35,	y:21, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[1,3,65,66],					soldiers:0, player:"", color:""	};
			_objCountries["CANADA"]			= {id:3,	index:"CANADA", 		movie:new CANADA(), 		name:"Canada",			x:-20,	y:42, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[5,4,2],						soldiers:0, player:"", color:""	};
			_objCountries["OREGON"]			= {id:4,	index:"OREGON", 		movie:new OREGON(), 		name:"Oregon",			x:-8,	y:81, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[3,5,9,10],					soldiers:0, player:"", color:""	};
			_objCountries["TERRANOVA"]		= {id:5,	index:"TERRANOVA", 		movie:new TERRANOVA(), 		name:"Terranova",		x:78,	y:71, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[8,9,4,3],					soldiers:0, player:"", color:""	};
			_objCountries["NUEVAYORK"]		= {id:6,	index:"NUEVAYORK", 		movie:new NUEVAYORK(), 		name:"Nueva York",		x:145,	y:71, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[7,9],						soldiers:0, player:"", color:""	};
			_objCountries["GROENLANDIA"]	= {id:7,	index:"GROENLANDIA", 	movie:new GROENLANDIA(), 	name:"Groenlandia",		x:124,	y:-21, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[27,6,8,1],					soldiers:0, player:"", color:""	};
			_objCountries["LABRADOR"]		= {id:8,	index:"LABRADOR", 		movie:new LABRADOR(), 		name:"Labrador",		x:91,	y:33, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[7,5],						soldiers:0, player:"", color:""	};
			_objCountries["CHICAGO"]		= {id:9,	index:"CHICAGO", 		movie:new CHICAGO(), 		name:"Chicago",			x:114,	y:140, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[6,12,10,4,5],				soldiers:0, player:"", color:""	};
			_objCountries["LASVEGAS"]		= {id:10,	index:"LASVEGAS", 		movie:new LASVEGAS(), 		name:"Las Vegas",		x:-2,	y:135, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[4,9,12,11],					soldiers:0, player:"", color:""	};
			_objCountries["CALIFORNIA"]		= {id:11,	index:"CALIFORNIA", 	movie:new CALIFORNIA(), 	name:"California",		x:0,	y:177, 	continent:_objContinents["AMERICA DEL NORTE"], 	icon:_objIconCards["CASCO"],	limits:[10,12,13,69],				soldiers:0, player:"", color:""	};
			_objCountries["FLORIDA"]		= {id:12,	index:"FLORIDA", 		movie:new FLORIDA(), 		name:"Florida",			x:116,	y:187, 	continent:_objContinents["AMERICA DEL NORTE"],	icon:_objIconCards["CASCO"],	limits:[9,17,11,10],				soldiers:0, player:"", color:""	};
			//AMERICA CENTRAL
			_objCountries["MEXICO"]			= {id:13,	index:"MEXICO", 		movie:new MEXICO(), 		name:"Mexico",			x:57, 	y:207, 	continent:_objContinents["AMERICA CENTRAL"], 	icon:_objIconCards["CASCO"],	limits:[11,17,14],					soldiers:0, player:"", color:""	};
			_objCountries["HONDURAS"]		= {id:14,	index:"HONDURAS", 		movie:new HONDURAS(), 		name:"Honduras",		x:66, 	y:241, 	continent:_objContinents["AMERICA CENTRAL"], 	icon:_objIconCards["CASCO"],	limits:[13,17,15],					soldiers:0, player:"", color:""	};
			_objCountries["ELSALVADOR"]		= {id:15,	index:"ELSALVADOR", 	movie:new ELSALVADOR(), 	name:"El Salvador",		x:78, 	y:261, 	continent:_objContinents["AMERICA CENTRAL"], 	icon:_objIconCards["CASCO"],	limits:[14,16],						soldiers:0, player:"", color:""	};
			_objCountries["NICARAGUA"]		= {id:16,	index:"NICARAGUA", 		movie:new NICARAGUA(), 		name:"Nicaragua",		x:111, 	y:250, 	continent:_objContinents["AMERICA CENTRAL"], 	icon:_objIconCards["CASCO"],	limits:[18,19,15],					soldiers:0, player:"", color:""	};
			_objCountries["CUBA"]			= {id:17,	index:"CUBA", 			movie:new CUBA(), 			name:"Cuba",			x:161, 	y:217, 	continent:_objContinents["AMERICA CENTRAL"], 	icon:_objIconCards["CASCO"],	limits:[18,14,13,12],				soldiers:0, player:"", color:""	};
			_objCountries["JAMAICA"]		= {id:18,	index:"JAMAICA", 		movie:new JAMAICA(), 		name:"Jamaica",			x:168, 	y:247, 	continent:_objContinents["AMERICA CENTRAL"], 	icon:_objIconCards["CASCO"],	limits:[17,16],						soldiers:0, player:"", color:""	};
			//AMERICA DEL SUR
			_objCountries["COLOMBIA"]		= {id:19,	index:"COLOMBIA", 		movie:new COLOMBIA(), 		name:"Colombia",		x:143, 	y:272, 	continent:_objContinents["AMERICA DEL SUR"], 	icon:_objIconCards["CASCO"],	limits:[20,21,22,16],				soldiers:0, player:"", color:""	};
			_objCountries["VENEZUELA"]		= {id:20,	index:"VENEZUELA", 		movie:new VENEZUELA(), 		name:"Venezuela",		x:219, 	y:286, 	continent:_objContinents["AMERICA DEL SUR"], 	icon:_objIconCards["CASCO"],	limits:[21,19],						soldiers:0, player:"", color:""	};
			_objCountries["BRASIL"]			= {id:21,	index:"BRASIL", 		movie:new BRASIL(), 		name:"Brasil",			x:186, 	y:325, 	continent:_objContinents["AMERICA DEL SUR"], 	icon:_objIconCards["CASCO"],	limits:[43,25,26,24,23,22,19,20],	soldiers:0, player:"", color:""	};
			_objCountries["CHILE"]			= {id:22,	index:"CHILE", 			movie:new CHILE(), 			name:"Chile",			x:151, 	y:336, 	continent:_objContinents["AMERICA DEL SUR"], 	icon:_objIconCards["CASCO"],	limits:[19,21,23,26,70],			soldiers:0, player:"", color:""	};
			_objCountries["BOLIVIA"]		= {id:23,	index:"BOLIVIA", 		movie:new BOLIVIA(), 		name:"Bolivia",			x:208, 	y:368, 	continent:_objContinents["AMERICA DEL SUR"], 	icon:_objIconCards["CASCO"],	limits:[21,24,26,22],				soldiers:0, player:"", color:""	};
			_objCountries["PARAGUAY"]		= {id:24,	index:"PARAGUAY", 		movie:new PARAGUAY(), 		name:"Paraguay",		x:229, 	y:385, 	continent:_objContinents["AMERICA DEL SUR"], 	icon:_objIconCards["CASCO"],	limits:[21,26,23],					soldiers:0, player:"", color:""	};
			_objCountries["URUGUAY"]		= {id:25,	index:"URUGUAY", 		movie:new URUGUAY(), 		name:"Uruguay",			x:241, 	y:428, 	continent:_objContinents["AMERICA DEL SUR"], 	icon:_objIconCards["CASCO"],	limits:[21,46,26],					soldiers:0, player:"", color:""	};
			_objCountries["ARGENTINA"]		= {id:26,	index:"ARGENTINA", 		movie:new ARGENTINA(), 		name:"Argentina",		x:152, 	y:419, 	continent:_objContinents["AMERICA DEL SUR"], 	icon:_objIconCards["CASCO"],	limits:[23,24,21,25,22],			soldiers:0, player:"", color:""	};
			//EUROPA
			_objCountries["ISLANDIA"]		= {id:27,	index:"ISLANDIA", 		movie:new ISLANDIA(), 		name:"Islandia",		x:248, 	y:36, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[30,28,7],					soldiers:0, player:"", color:""	};
			_objCountries["IRLANDA"]		= {id:28,	index:"IRLANDA", 		movie:new IRLANDA(), 		name:"Irlanda",			x:315, 	y:85, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[29,27],						soldiers:0, player:"", color:""	};
			_objCountries["GRANBRETAÑA"]	= {id:29,	index:"GRANBRETAÑA", 	movie:new GRANBRETAÑA(), 	name:"Gran Bretaña",	x:414, 	y:80, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[38,42,28],					soldiers:0, player:"", color:""	};
			_objCountries["NORUEGA"]		= {id:30,	index:"NORUEGA", 		movie:new NORUEGA(), 		name:"Noruega",			x:496, 	y:-18, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[31,27],						soldiers:0, player:"", color:""	};
			_objCountries["FINLANDIA"]		= {id:31,	index:"FINLANDIA", 		movie:new FINLANDIA(), 		name:"Finlandia",		x:551, 	y:-23, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[32,30],						soldiers:0, player:"", color:""	};
			_objCountries["BIELORRUSIA"]	= {id:32,	index:"BIELORRUSIA", 	movie:new BIELORRUSIA(), 	name:"Bielorrusia",		x:584, 	y:-13, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[33,35,31],					soldiers:0, player:"", color:""	};
			_objCountries["UCRANIA"]		= {id:33,	index:"UCRANIA", 		movie:new UCRANIA(), 		name:"Ucrania",			x:616, 	y:-12, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[56,54,34,35,32],			soldiers:0, player:"", color:""	};
			_objCountries["ALBANIA"]		= {id:34,	index:"ALBANIA", 		movie:new ALBANIA(), 		name:"Albania",			x:597, 	y:102, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[33,54,53,35],				soldiers:0, player:"", color:""	};
			_objCountries["POLONIA"]		= {id:35,	index:"POLONIA", 		movie:new POLONIA(), 		name:"Polonia",			x:574, 	y:71, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[32,33,34,44,37,36,38],		soldiers:0, player:"", color:""	};
			_objCountries["SERBIA"]			= {id:36,	index:"SERBIA", 		movie:new SERBIA(), 		name:"Serbia",			x:553, 	y:98, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[35,37,38],					soldiers:0, player:"", color:""	};
			_objCountries["CROACIA"]		= {id:37,	index:"CROACIA", 		movie:new CROACIA(), 		name:"Croacia",			x:555, 	y:122, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[36,35,39,38],				soldiers:0, player:"", color:""	};
			_objCountries["ALEMANIA"]		= {id:38,	index:"ALEMANIA", 		movie:new ALEMANIA(), 		name:"Alemania",		x:504, 	y:78, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[35,36,37,39,40,29],			soldiers:0, player:"", color:""	};
			_objCountries["ITALIA"]			= {id:39,	index:"ITALIA", 		movie:new ITALIA(), 		name:"Italia",			x:530, 	y:148, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[38,37,40],					soldiers:0, player:"", color:""	};
			_objCountries["FRANCIA"]		= {id:40,	index:"FRANCIA", 		movie:new FRANCIA(), 		name:"Francia",			x:452, 	y:98, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[38,39,41],					soldiers:0, player:"", color:""	};
			_objCountries["ESPAÑA"]			= {id:41,	index:"ESPAÑA", 		movie:new ESPAÑA(), 		name:"España",			x:429, 	y:147, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[40,43,42],					soldiers:0, player:"", color:""	};
			_objCountries["PORTUGAL"]		= {id:42,	index:"PORTUGAL", 		movie:new PORTUGAL(), 		name:"Portugal",		x:416, 	y:155, 	continent:_objContinents["EUROPA"], 			icon:_objIconCards["CASCO"],	limits:[29,41],						soldiers:0, player:"", color:""	};
			//AFRICA
			_objCountries["SAHARA"]			= {id:43,	index:"SAHARA", 		movie:new SAHARA(), 		name:"Sahara",			x:414, 	y:207, 	continent:_objContinents["AFRICA"], 			icon:_objIconCards["CASCO"],	limits:[41,44,45,46,21],			soldiers:0, player:"", color:""	};
			_objCountries["EGIPTO"]			= {id:44,	index:"EGIPTO", 		movie:new EGIPTO(), 		name:"Egipto",			x:501, 	y:217, 	continent:_objContinents["AFRICA"], 			icon:_objIconCards["CASCO"],	limits:[35,53,52,50,45,43],			soldiers:0, player:"", color:""	};
			_objCountries["ETIOPIA"]		= {id:45,	index:"ETIOPIA", 		movie:new ETIOPIA(), 		name:"Etiopia",			x:504, 	y:259, 	continent:_objContinents["AFRICA"], 			icon:_objIconCards["CASCO"],	limits:[44,47,46,43],				soldiers:0, player:"", color:""	};
			_objCountries["NIGERIA"]		= {id:46,	index:"NIGERIA", 		movie:new NIGERIA(), 		name:"Nigeria",			x:506, 	y:309, 	continent:_objContinents["AFRICA"], 			icon:_objIconCards["CASCO"],	limits:[45,47,48,49,25,43],			soldiers:0, player:"", color:""	};
			_objCountries["ANGOLA"]			= {id:47,	index:"ANGOLA", 		movie:new ANGOLA(), 		name:"Angola",			x:596, 	y:285, 	continent:_objContinents["AFRICA"], 			icon:_objIconCards["CASCO"],	limits:[45,48,46],					soldiers:0, player:"", color:""	};
			_objCountries["MAURITANIA"]		= {id:48,	index:"MAURITANIA", 	movie:new MAURITANIA(), 	name:"Mauritania",		x:552, 	y:354, 	continent:_objContinents["AFRICA"], 			icon:_objIconCards["CASCO"],	limits:[47,50,49,46],				soldiers:0, player:"", color:""	};
			_objCountries["SUDAFRICA"]		= {id:49,	index:"SUDAFRICA", 		movie:new SUDAFRICA(), 		name:"Sudafrica",		x:550, 	y:376, 	continent:_objContinents["AFRICA"], 			icon:_objIconCards["CASCO"],	limits:[48,50,46],					soldiers:0, player:"", color:""	};
			_objCountries["MADAGASCAR"]		= {id:50,	index:"MADAGASCAR", 	movie:new MADAGASCAR(), 	name:"Madagascar",		x:649, 	y:393, 	continent:_objContinents["AFRICA"], 			icon:_objIconCards["CASCO"],	limits:[49,48],						soldiers:0, player:"", color:""	};
			//ASIA
			_objCountries["ARABIA"]			= {id:51,	index:"ARABIA", 		movie:new ARABIA(), 		name:"Arabia",			x:625, 	y:247, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[52],						soldiers:0, player:"", color:""	};
			_objCountries["ISRAEL"]			= {id:52,	index:"ISRAEL", 		movie:new ISRAEL(), 		name:"Israel",			x:617, 	y:207, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[55,51,44,53],				soldiers:0, player:"", color:""	};
			_objCountries["IRAK"]			= {id:53,	index:"IRAK", 			movie:new IRAK(), 			name:"Irak",			x:607, 	y:132, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[34,54,55,52,44],			soldiers:0, player:"", color:""	};
			_objCountries["IRAN"]			= {id:54,	index:"IRAN", 			movie:new IRAN(), 			name:"Iran",			x:654, 	y:76, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[33,56,55,53,34],			soldiers:0, player:"", color:""	};
			_objCountries["TURQUIA"]		= {id:55,	index:"TURQUIA", 		movie:new TURQUIA(), 		name:"Turquia",			x:654, 	y:140, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[56,59,60,52,53,54],			soldiers:0, player:"", color:""	};
			_objCountries["RUSIA"]			= {id:56,	index:"RUSIA", 			movie:new RUSIA(), 			name:"Rusia",			x:686, 	y:-9, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[57,58,59,55,54,33],			soldiers:0, player:"", color:""	};
			_objCountries["SIBERIA"]		= {id:57,	index:"SIBERIA", 		movie:new SIBERIA(), 		name:"Siberia",			x:716, 	y:3, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[59,58,56],					soldiers:0, player:"", color:""	};
			_objCountries["CHECHENIA"]		= {id:58,	index:"CHECHENIA", 		movie:new CHECHENIA(), 		name:"Chechenia",		x:714, 	y:45, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[57,59,56],					soldiers:0, player:"", color:""	};
			_objCountries["CHINA"]			= {id:59,	index:"CHINA", 			movie:new CHINA(), 			name:"China",			x:742, 	y:23, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[66,65,63,61,60,55,56,58,57],soldiers:0, player:"", color:""	};
			_objCountries["INDIA"]			= {id:60,	index:"INDIA", 			movie:new INDIA(), 			name:"India",			x:724, 	y:235, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[59,61,62,67,55],			soldiers:0, player:"", color:""	};
			_objCountries["MALASIA"]		= {id:61,	index:"MALASIA", 		movie:new MALASIA(), 		name:"Malasia",			x:766, 	y:172, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[59,63,62,60],				soldiers:0, player:"", color:""	};
			_objCountries["VIETNAN"]		= {id:62,	index:"VIETNAN", 		movie:new VIETNAN(), 		name:"Vietnan",			x:772, 	y:241, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[63,68,60,61],				soldiers:0, player:"", color:""	};
			_objCountries["COREA"]			= {id:63,	index:"COREA", 			movie:new COREA(), 			name:"Corea",			x:807, 	y:135, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[65,64,62,61,59],			soldiers:0, player:"", color:""	};
			_objCountries["JAPON"]			= {id:64,	index:"JAPON", 			movie:new JAPON(), 			name:"Japon",			x:856, 	y:83, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[63,65],						soldiers:0, player:"", color:""	};
			_objCountries["KAMCHATKA"]		= {id:65,	index:"KAMCHATKA", 		movie:new KAMCHATKA(),		name:"Kamchatka",		x:802, 	y:56, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[66,2,64,63,59],				soldiers:0, player:"", color:""	};
			_objCountries["CHUKCHI"]		= {id:66,	index:"CHUKCHI", 		movie:new CHUKCHI(), 		name:"Chukchi",			x:776, 	y:28, 	continent:_objContinents["ASIA"], 				icon:_objIconCards["CASCO"],	limits:[2,65,59],					soldiers:0, player:"", color:""	};
			//OCEANIA
			_objCountries["SUMATRA"]		= {id:67,	index:"SUMATRA", 		movie:new SUMATRA(), 		name:"Sumatra",			x:728, 	y:335, 	continent:_objContinents["OCEANIA"], 			icon:_objIconCards["CASCO"],	limits:[60,70],						soldiers:0, player:"", color:""	};
			_objCountries["FILIPINAS"]		= {id:68,	index:"FILIPINAS", 		movie:new FILIPINAS(), 		name:"Filipinas",		x:784, 	y:341, 	continent:_objContinents["OCEANIA"], 			icon:_objIconCards["CASCO"],	limits:[62,69,70],					soldiers:0, player:"", color:""	};
			_objCountries["TONGA"]			= {id:69,	index:"TONGA", 			movie:new TONGA(), 			name:"Tonga",			x:821, 	y:361, 	continent:_objContinents["OCEANIA"], 			icon:_objIconCards["CASCO"],	limits:[11,70,68],					soldiers:0, player:"", color:""	};
			_objCountries["AUSTRALIA"]		= {id:70,	index:"AUSTRALIA", 		movie:new AUSTRALIA(), 		name:"Australia",		x:726, 	y:368, 	continent:_objContinents["OCEANIA"], 			icon:_objIconCards["CASCO"],	limits:[67,68,69,22,72],			soldiers:0, player:"", color:""	};
			_objCountries["NUEVAZELANDA"]	= {id:71,	index:"NUEVAZELANDA", 	movie:new NUEVAZELANDA(), 	name:"Nueva Zelanda",	x:739, 	y:449, 	continent:_objContinents["OCEANIA"], 			icon:_objIconCards["CASCO"],	limits:[72],						soldiers:0, player:"", color:""	};
			_objCountries["TASMANIA"]		= {id:72,	index:"TASMANIA", 		movie:new TASMANIA(), 		name:"Tasmania",		x:781, 	y:433, 	continent:_objContinents["OCEANIA"], 			icon:_objIconCards["CASCO"],	limits:[70,71],						soldiers:0, player:"", color:""	};

			_objCountriesID = new Object();
			for(var i in _objCountries) _objCountriesID[_objCountries[i].id] = _objCountries[i].index;
		}


		/**
		 * crear y llenar los objetivos del juego
		 */
		private function setObjectiveCards():void
		{
			_objObjectiveCards = new Object();			
			_objObjectiveCards["OCUPAR EUROPA Y AMERICA DEL SUR"]																										= {id:1,  continent1:0, 	continent2:0, 	continent3:8, 	continent4:16, 	continent5:0, 	continent6:0, 	continent7:0, 	name:"Ocupar Europa y América del Sur" };
			_objObjectiveCards["OCUPAR AMERICA DEL NORTE, OCEANIA Y 5 PAISES DE AFRICA"]																				= {id:2,  continent1:12, 	continent2:0, 	continent3:0, 	continent4:0, 	continent5:5, 	continent6:0, 	continent7:6, 	name:"Ocupar América del Norte, Oceanía y 5 países de Africa" };
			_objObjectiveCards["OCUPAR ASIA Y AMERICA CENTRAL"]																											= {id:3,  continent1:0, 	continent2:6, 	continent3:0, 	continent4:0, 	continent5:0, 	continent6:16, 	continent7:0, 	name:"Ocupar Asia y América Central" };
			_objObjectiveCards["OCUPAR AMERICA DEL NORTE, 8 PAISES DE ASIA Y 4 DE EUROPA"]																				= {id:4,  continent1:12, 	continent2:0, 	continent3:0, 	continent4:4, 	continent5:0, 	continent6:8, 	continent7:0, 	name:"Ocupar América del Norte, 8 países de Asia y 4 de Europa" };
			_objObjectiveCards["OCUPAR 4 PAISES DE AMERICA DEL NORTE, 4 DE EUROPA, 4 DE ASIA, 3 DE AFRICA, 3 DE AMERICA DEL SUR, 3 DE AMERICA CENTRAL Y 3 DE OCEANIA"]	= {id:5,  continent1:4, 	continent2:3, 	continent3:3, 	continent4:4, 	continent5:3, 	continent6:4, 	continent7:3, 	name:"Ocupar 4 países de América del Norte, 4 de Europa, 4 de Asia, 3 de Africa, 3 de América del Sur, 3 de América Central y 3 de Oceanía" };
			_objObjectiveCards["OCUPAR OCEANIA, 6 PAISES DE ASIA, 6 DE AFRICA Y 6 DE AMERICA DEL NORTE"]																= {id:6,  continent1:6, 	continent2:0, 	continent3:0, 	continent4:0, 	continent5:6, 	continent6:6, 	continent7:6, 	name:"Ocupar Oceanía, 6 países de Asia, 6 de Africa y 6 de Amércia del Norte" };
			_objObjectiveCards["OCUPAR AMERICA CENTRAL, 6 PAISES DE AMERICA DEL SUR, 6 DE EUROPA Y 6 DE ASIA"]															= {id:7,  continent1:0, 	continent2:6, 	continent3:6, 	continent4:6, 	continent5:0, 	continent6:6, 	continent7:0, 	name:"Ocupar América Central, 6 países de América del Sur, 6 de Europa y 6 de Asia" };
			_objObjectiveCards["OCUPAR AMERICA DEL SUR, AFRICA Y 8 PAISES DE ASIA"]																						= {id:8,  continent1:0, 	continent2:0, 	continent3:8, 	continent4:0, 	continent5:8, 	continent6:8, 	continent7:0, 	name:"Ocupar América del Sur, Africa y 8 países de Asia" };
			_objObjectiveCards["OCUPAR OCEANIA, AFRICA, 4 PAISES DE AMERICA CENTRAL Y 4 DE ASIA"]																		= {id:9,  continent1:0, 	continent2:4, 	continent3:0, 	continent4:0, 	continent5:8, 	continent6:4, 	continent7:6, 	name:"Ocupar Oceanía, Africa, 4 países de América Central y 4 de Asia" };
			_objObjectiveCards["OCUPAR EUROPA, 4 PAISES DE ASIA Y 4 PAISES DE AMERICA DEL SUR"]																			= {id:10, continent1:0, 	continent2:0, 	continent3:4, 	continent4:16, 	continent5:0, 	continent6:4, 	continent7:0, 	name:"Ocupar Europa, 4 países de Asia y 4 países de América del Sur" };
			
			//FALTA IMPLEMENTAR LOS OBJETIVOS DE DESTRUIR OTROS JUGADORES - POR AHORA PENDIENTE
		}


		/**
		 * crear y llenar los datos de situaciones
		 */
		private function setSituationCards():void
		{
			_objSituationCards = new Object();
			_objSituationCards["NORMAL"] 			= {id:1, name:"Normal", 			desc:""};
			_objSituationCards["NIEVE"] 			= {id:2, name:"Nieve",				desc:""};
			_objSituationCards["VIENTO A FAVOR"] 	= {id:3, name:"Viento a Favor",		desc:""};
			_objSituationCards["FRONTERA ABIERTA"] 	= {id:4, name:"Frontera Abierta",	desc:""};
			_objSituationCards["FRONTERA CERRADA"] 	= {id:5, name:"Frontera Cerrada",	desc:""};
			_objSituationCards["CRISIS"] 			= {id:6, name:"Crisis",				desc:""};
		}
		
		
//_________________________________________________________________________________ GETTERS

		public function get intCards		():uint		{ var int:uint = 0; for(var i in _objCountries) int++; return int; }		
		public function get intContinents	():uint		{ var int:uint = 0; for(var i in _objContinents) int++; return int; }
		public function get intCountries	():uint		{ var int:uint = 0; for(var i in _objCountries) int++; return int; }
		public function get intObjetives	():uint		{ var int:uint = 0; for(var i in _objObjectiveCards) int++; return int; }
		public function get intPlayers		():uint		{ var int:uint = 0; for(var i in _objPlayers) int++; return int; }		
		public function get intSituations	():uint		{ var int:uint = 0; for(var i in _objSituationCards) int++; return int; }

		public function get objCards		():Object	{ return _objCountries; }
		public function get objContinents	():Object	{ return _objContinents; }		
		public function get objCountries	():Object	{ return _objCountries; }
		public function get objObjetives	():Object	{ return _objObjectiveCards; }
		public function get objPlayers		():Object	{ return _objPlayers; }		
		public function get objSituations	():Object	{ return _objSituationCards; }


//_________________________________________________________________________________ SETTERS


	}
}

class SingletonEnforcer{}